package com.xd.center.api.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@ApiModel(value = "小区相关走势")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper=false)
public class CommunityTrend implements Serializable {

  @ApiModelProperty(value = "走势")
  @JSONField(name = "echartDate")
  private List<Trend> trends;
  @ApiModelProperty(value = "比率")
  @JSONField(name = "dataAdv")
  private Ratio ratio;

  @ApiModel(value = "走势")
  @Data
  class Trend implements Serializable {
    @ApiModelProperty(value = "任务编号")
    private String taskCode;
    @ApiModelProperty(value = "月份")
    @JSONField(name = "monthDate")
    private String month;
    @ApiModelProperty(value = "小区价格")
    private BigDecimal price;
    @ApiModelProperty(value = "街道办价格")
    private BigDecimal streetPrice;
    @ApiModelProperty(value = "区县价格")
    private BigDecimal districtPrice;
    @ApiModelProperty(value = "城市价格")
    private BigDecimal cityPrice;
    @ApiModelProperty(value = "挂牌量")
    @JSONField(name = "numberCount")
    private Long netListingCount;
    @ApiModelProperty(value = "成交量")
    private Long saleCount;
    @ApiModelProperty(value = "租赁量")
    private Long rentCount;
  }

  @ApiModel(value = "比率")
  @Data
  class Ratio implements Serializable {
    @ApiModelProperty(value = "高于城市平均价比率")
    @JSONField(name = "cityPriceThan")
    private String cityPriceRatio;
    @ApiModelProperty(value = "城市排名")
    private String cityRanking;
    @ApiModelProperty(value = "高于区县平均价比率")
    @JSONField(name = "districtPriceThan")
    private String districtPriceRatio;
    @ApiModelProperty(value = "区县排名")
    private String districtRanking;

    @ApiModelProperty(value = "小区同比")
    @JSONField(name = "yearThanPrice")
    private String priceYoyRatio;
    @ApiModelProperty(value = "小区环比")
    @JSONField(name = "monthThanPrice")
    private String priceMomRatio;

    @ApiModelProperty(value = "成交同比")
    @JSONField(name = "saleTb")
    private String saleYoyRatio;
    @ApiModelProperty(value = "成交环比")
    @JSONField(name = "saleHb")
    private String saleMomRatio;

    @ApiModelProperty(value = "挂牌同比")
    @JSONField(name = "netListingTb")
    private String netListingYoyRatio;
    @ApiModelProperty(value = "挂牌环比")
    @JSONField(name = "netListingHb")
    private String netListingMomRatio;

    @ApiModelProperty(value = "租赁同比")
    @JSONField(name = "rentTb")
    private String rentYoyRatio;
    @ApiModelProperty(value = "租赁环比")
    @JSONField(name = "rentHb")
    private String rentMomRatio;


  }
}
